3.179 \(\int (a+a \tan ^2(c+d x))^4 \, dx\)

Optimal. Leaf size=65 \[ \frac{a^4 \tan ^7(c+d x)}{7 d}+\frac{3 a^4 \tan ^5(c+d x)}{5 d}+\frac{a^4 \tan ^3(c+d x)}{d}+\frac{a^4 \tan (c+d x)}{d} \]

[Out]

(a^4*Tan[c + d*x])/d + (a^4*Tan[c + d*x]^3)/d + (3*a^4*Tan[c + d*x]^5)/(5*d) + (a^4*Tan[c + d*x]^7)/(7*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0350688, antiderivative size = 65, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3657, 12, 3767} \[ \frac{a^4 \tan ^7(c+d x)}{7 d}+\frac{3 a^4 \tan ^5(c+d x)}{5 d}+\frac{a^4 \tan ^3(c+d x)}{d}+\frac{a^4 \tan (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Tan[c + d*x]^2)^4,x]

[Out]

(a^4*Tan[c + d*x])/d + (a^4*Tan[c + d*x]^3)/d + (3*a^4*Tan[c + d*x]^5)/(5*d) + (a^4*Tan[c + d*x]^7)/(7*d)

Rule 3657

Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*sec[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a, b]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin{align*} \int \left (a+a \tan ^2(c+d x)\right )^4 \, dx &=\int a^4 \sec ^8(c+d x) \, dx\\ &=a^4 \int \sec ^8(c+d x) \, dx\\ &=-\frac{a^4 \operatorname{Subst}\left (\int \left (1+3 x^2+3 x^4+x^6\right ) \, dx,x,-\tan (c+d x)\right )}{d}\\ &=\frac{a^4 \tan (c+d x)}{d}+\frac{a^4 \tan ^3(c+d x)}{d}+\frac{3 a^4 \tan ^5(c+d x)}{5 d}+\frac{a^4 \tan ^7(c+d x)}{7 d}\\ \end{align*}

Mathematica [A]  time = 0.1956, size = 46, normalized size = 0.71 \[ \frac{a^4 \left (\frac{1}{7} \tan ^7(c+d x)+\frac{3}{5} \tan ^5(c+d x)+\tan ^3(c+d x)+\tan (c+d x)\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Tan[c + d*x]^2)^4,x]

[Out]

(a^4*(Tan[c + d*x] + Tan[c + d*x]^3 + (3*Tan[c + d*x]^5)/5 + Tan[c + d*x]^7/7))/d

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 43, normalized size = 0.7 \begin{align*}{\frac{{a}^{4}}{d} \left ({\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{7}}{7}}+{\frac{3\, \left ( \tan \left ( dx+c \right ) \right ) ^{5}}{5}}+ \left ( \tan \left ( dx+c \right ) \right ) ^{3}+\tan \left ( dx+c \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*tan(d*x+c)^2)^4,x)

[Out]

1/d*a^4*(1/7*tan(d*x+c)^7+3/5*tan(d*x+c)^5+tan(d*x+c)^3+tan(d*x+c))

________________________________________________________________________________________

Maxima [B]  time = 1.73162, size = 212, normalized size = 3.26 \begin{align*} a^{4} x + \frac{{\left (15 \, \tan \left (d x + c\right )^{7} - 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 105 \, d x + 105 \, c - 105 \, \tan \left (d x + c\right )\right )} a^{4}}{105 \, d} + \frac{4 \,{\left (3 \, \tan \left (d x + c\right )^{5} - 5 \, \tan \left (d x + c\right )^{3} - 15 \, d x - 15 \, c + 15 \, \tan \left (d x + c\right )\right )} a^{4}}{15 \, d} + \frac{2 \,{\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a^{4}}{d} - \frac{4 \,{\left (d x + c - \tan \left (d x + c\right )\right )} a^{4}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)^2)^4,x, algorithm="maxima")

[Out]

a^4*x + 1/105*(15*tan(d*x + c)^7 - 21*tan(d*x + c)^5 + 35*tan(d*x + c)^3 + 105*d*x + 105*c - 105*tan(d*x + c))
*a^4/d + 4/15*(3*tan(d*x + c)^5 - 5*tan(d*x + c)^3 - 15*d*x - 15*c + 15*tan(d*x + c))*a^4/d + 2*(tan(d*x + c)^
3 + 3*d*x + 3*c - 3*tan(d*x + c))*a^4/d - 4*(d*x + c - tan(d*x + c))*a^4/d

________________________________________________________________________________________

Fricas [A]  time = 0.998153, size = 136, normalized size = 2.09 \begin{align*} \frac{5 \, a^{4} \tan \left (d x + c\right )^{7} + 21 \, a^{4} \tan \left (d x + c\right )^{5} + 35 \, a^{4} \tan \left (d x + c\right )^{3} + 35 \, a^{4} \tan \left (d x + c\right )}{35 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)^2)^4,x, algorithm="fricas")

[Out]

1/35*(5*a^4*tan(d*x + c)^7 + 21*a^4*tan(d*x + c)^5 + 35*a^4*tan(d*x + c)^3 + 35*a^4*tan(d*x + c))/d

________________________________________________________________________________________

Sympy [A]  time = 1.20402, size = 68, normalized size = 1.05 \begin{align*} \begin{cases} \frac{a^{4} \tan ^{7}{\left (c + d x \right )}}{7 d} + \frac{3 a^{4} \tan ^{5}{\left (c + d x \right )}}{5 d} + \frac{a^{4} \tan ^{3}{\left (c + d x \right )}}{d} + \frac{a^{4} \tan{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \left (a \tan ^{2}{\left (c \right )} + a\right )^{4} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)**2)**4,x)

[Out]

Piecewise((a**4*tan(c + d*x)**7/(7*d) + 3*a**4*tan(c + d*x)**5/(5*d) + a**4*tan(c + d*x)**3/d + a**4*tan(c + d
*x)/d, Ne(d, 0)), (x*(a*tan(c)**2 + a)**4, True))

________________________________________________________________________________________

Giac [B]  time = 2.31117, size = 701, normalized size = 10.78 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)^2)^4,x, algorithm="giac")

[Out]

-1/35*(35*a^4*tan(d*x)^7*tan(c)^6 + 35*a^4*tan(d*x)^6*tan(c)^7 + 35*a^4*tan(d*x)^7*tan(c)^4 - 105*a^4*tan(d*x)
^6*tan(c)^5 - 105*a^4*tan(d*x)^5*tan(c)^6 + 35*a^4*tan(d*x)^4*tan(c)^7 + 21*a^4*tan(d*x)^7*tan(c)^2 - 35*a^4*t
an(d*x)^6*tan(c)^3 + 315*a^4*tan(d*x)^5*tan(c)^4 + 315*a^4*tan(d*x)^4*tan(c)^5 - 35*a^4*tan(d*x)^3*tan(c)^6 +
21*a^4*tan(d*x)^2*tan(c)^7 + 5*a^4*tan(d*x)^7 - 7*a^4*tan(d*x)^6*tan(c) + 105*a^4*tan(d*x)^5*tan(c)^2 - 315*a^
4*tan(d*x)^4*tan(c)^3 - 315*a^4*tan(d*x)^3*tan(c)^4 + 105*a^4*tan(d*x)^2*tan(c)^5 - 7*a^4*tan(d*x)*tan(c)^6 +
5*a^4*tan(c)^7 + 21*a^4*tan(d*x)^5 - 35*a^4*tan(d*x)^4*tan(c) + 315*a^4*tan(d*x)^3*tan(c)^2 + 315*a^4*tan(d*x)
^2*tan(c)^3 - 35*a^4*tan(d*x)*tan(c)^4 + 21*a^4*tan(c)^5 + 35*a^4*tan(d*x)^3 - 105*a^4*tan(d*x)^2*tan(c) - 105
*a^4*tan(d*x)*tan(c)^2 + 35*a^4*tan(c)^3 + 35*a^4*tan(d*x) + 35*a^4*tan(c))/(d*tan(d*x)^7*tan(c)^7 - 7*d*tan(d
*x)^6*tan(c)^6 + 21*d*tan(d*x)^5*tan(c)^5 - 35*d*tan(d*x)^4*tan(c)^4 + 35*d*tan(d*x)^3*tan(c)^3 - 21*d*tan(d*x
)^2*tan(c)^2 + 7*d*tan(d*x)*tan(c) - d)